
package rpc;

import java.util.*;

public class TestCliente {
    
    //Funcion principal
	public static void main(String arg[]){
		menu();
	}
	
	//Funcion de menu de cliente, puede repetirse en bucle
	public static void menu(){
		Scanner sc = new Scanner(System.in);
		String name[] = {"SUM", "MUL", "MODULO","POTENCIA","DIV_ENTERA"};
		int op=0,a=0,b=0;
		
		System.out.println("Funciones disponibles ");
		System.out.println("1. Suma");
		System.out.println("2. Multiplicacion");
		System.out.println("3. Modulo");
		System.out.println("4. Potencia");
		System.out.println("5. Division Entera");
		System.out.print("> ");
		op = sc.nextInt();
		System.out.println("Ingrese Variable 1");
		System.out.print("> ");
		a = sc.nextInt();
		System.out.println("Ingrese Variable 2");
		System.out.print("> ");
		b = sc.nextInt();
		
		System.out.println("\nIniciando");
		Stub prueba = new Stub(name[op-1], a, b);
		prueba.printDatagrama();
		System.out.println("Resultado: "+prueba.getResult());
	}
    
}
